<div class="comment">
	<div class="created_by"><%=comment.user.name%> <%=comment.user.last_name%> 
		<div class="created_at"><%=comment.created_at.strftime("%B %d, %Y")%></div>
		
			<div class="rate"><%if comment.rate%>Esta calificado:(<%=comment.rate%>)<%end%>
				<div class="rating">Califico padre:(<%=comment.rating%>)</div>
			</div>
			</br>
	</div>
	<div class = "content">
		<%=link_to comment.body, comment %>
	</div>
	</br>
	<%if (can? :create, @comment) and comment.depth<3%>
		<%= form_for(Comment.new, :html => {:id => comment.id }) do |f| %>
		  <div class="field">
			<%= f.hidden_field :post_id,:value=> comment.post_id%>
			<%= f.hidden_field :parent_id,:value=> comment.id %> 
			<%= f.hidden_field :user_id, :value=> @current_user.id%>
		    <b><%= f.label :body, "Comentar: " %></b>
		    <%= f.text_area :body,:rows => 3 %>
			<%= f.label :rating %></b>
		    <%= f.select(:rating, [1,2,3,4,5,6,7], :selected => 4) %>
		  </div>
		  <div class='action'>
		    <%= f.submit %>
		  </div>
		<%end%>
	<% end %>
	
	<%if can? :destroy, Comment%>
			<%= link_to 'Eliminar', comment, :confirm => 'Are you sure?', :method => :delete %>
	<%end%>



</div>